<!DOCTYPE html>
<html lang="en">
<head>
    <title>资金日报表详情</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/dist/plugins/select2/select2.min.css">
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">
    <style type="text/css">
        .leftFilter {
            float: left;
            text-align: left;
            margin-right: 5px;
        }

        .clickable {
            color: #489EF1;;
            cursor: pointer;
            text-align: left;
            font-weight: bold;
        }
        .topDiv{
            text-align: right;
            position: absolute;
            width: 100%;
            background: #fff;
            top: 0;
            left: 0;
            padding: 15px 20px;
            padding-bottom: 5px;
        }
        .tableTitle{
            background-color: yellow;
            font-weight: bold;
            color:black;
            text-align: center;
            height: 24px;
            line-height: 24px;
        }
        .table>thead>tr>.tableTitle{
            background-color: #f8f8f8 !important;
        }
        .lineBg{
            background-color: #d2e8fd !important;
            padding: 0 !important;
        }
        table input{
            border:none;
            background:none;
            width: 100%;
            text-align: center;
        }
        .reginTd{
            max-width: 105px;
            overflow: hidden;
            text-overflow:ellipsis;
            white-space: nowrap;
            position: relative;
        }
        .div-td-content-more{
            position:absolute;
            height:auto;
            z-index:999;
            line-height:20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display:none;
        }
        .div-td-content-more i{
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left:50px;
            top:-12px;
        }
        .content {
            padding: 8px 8px 0 8px;
        }
    </style>
</head>
<body>
<section class="content" id="list">
    <div class="div-td-content-more"><i></i></div>
    <div class="topDiv">
        <div class="leftFilter" style="width: 150px;" v-if="type!='report'">
            <select class="form-control  queryIdSelect"  v-model="companyId"  @change="getList" style="width: 150px;margin-right: 10px;height: 25px;line-height: 25px;padding: 0;
    font-size: 12px;">
                <option value="" selected="selected">请选择公司</option>
                <option :value="item.companyId" v-for="(item,i) in companyList">{{item.companyName}}</option>

            </select>
        </div>
        <input class="pull-left form-control pull-left input-sm" type="text" v-model="time" @focus="showDatePicker($event)" placeholder="请选择时间" style="width: 150px;">
        <button type="button" class="btn oaBtn btn-sm pull-left" @click="getList">查询</button>
        <div class="leftFilter" style="width: 150px;margin-left: 5px;">
            <select v-model="bankChecked" class="form-control select2 companySelect" >
                <option value="">-银行账户快速定位-</option>
                <option v-for="option in bankList" :value="option.id">{{option.bankName}}</option>
                <!--<option v-for="option in listCompany" v-if="isNotBigCusCompany(option.name)" :value="option.id">-->
                <!--{{option.name}}-->
                <!--</option>-->
            </select>
        </div>
        <button v-if="type=='report'" type="button" class="btn oaBtn btn-sm pull-right" @click="goDetail('bankList')">银行卡列表</button>
        <!--<button type="button" class="btn oaBtn btn-sm pull-right" >导出</button>-->
        <button v-if="type!='report'" type="button" class="btn oaBtn btn-sm pull-right" @click="goDetail('expenditure')">支出</button>
        <button v-if="type!='report'" type="button" class="btn oaBtn btn-sm pull-right" @click="goDetail('income')">收入</button>
        <button v-if="type!='report'" type="button" class="btn oaBtn btn-sm pull-right" @click="goDetail('transferAccounts')">内部转账</button>

        <div class="pull-right" style="height: 24px;line-height: 24px;margin-right: 10px;font-weight: bold;display: none;" >合计：0.00</div>
    </div>
    <div class="box-body no-padding iframeH3" style="margin-top:30px;overflow: auto;background: #fff;border-top: 1px solid #cbcbcd;
    border-bottom: 1px solid #cbcbcd">
        <div class="tableTitle">承兑汇票</div>
        <table class="table table-hover" style="margin: -1px 0">
            <thead>
            <tr>
                <th style="width:6%;text-align: center" class="tableTitle">编号</th>
                <th style="width:7%;text-align: center" class="tableTitle">金额</th>
                <th style="width:13%;text-align: center" class="tableTitle">收入项目</th>
                <th style="width:7%;text-align: center" class="tableTitle">到期时间</th>
                <th style="width:11%;text-align: center" class="tableTitle">出票银行</th>
                <th style="width:6%;text-align: center" class="tableTitle">汇票号码</th>
                <th  class="lineBg" style="width:1%;text-align: center">&nbsp;</th>
                <th style="width:6%;text-align: center" class="tableTitle">编号</th>
                <th style="width:7%;text-align: center" class="tableTitle">金额</th>
                <th style="width:12%;text-align: center" class="tableTitle">支出项目</th>
                <th style="width:7%;text-align: center" class="tableTitle">到期时间</th>
                <th style="width:11%;text-align: center" class="tableTitle">出票银行</th>
                <th style="width:6%;text-align: center" class="tableTitle">汇票号码</th>
            </tr>
            </thead>
            <tbody style="text-align: right">
            <tr style="text-align: center" v-for="i in debitsList.number">
                <template v-if="debitsList.inputList[i-1]" v-cloak>
                    <td >{{debitsList.inputList[i-1]?i:""}}</td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: right">{{fmoney(debitsList.inputList[i-1].money)}}</td>
                    <td v-else><input type="text" v-model="debitsList.inputList[i-1].money"  style="text-align: right" @focus="getOldData(debitsList.inputList[i-1].money)" @blur="save(debitsList.inputList[i-1].id,debitsList.inputList[i-1].money,'money','debits')"></td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: left" >{{debitsList.inputList[i-1].incomeProject}}</td>
                    <td v-else><input type="text" v-model="debitsList.inputList[i-1].incomeProject"  style="text-align: left" @focus="getOldData(debitsList.inputList[i-1].incomeProject)" @blur="save(debitsList.inputList[i-1].id,debitsList.inputList[i-1].incomeProject,'incomeProject','debits')"></td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: center">{{debitsList.inputList[i-1].dueDate}}</td>
                    <td v-else><input type="text" v-model="debitsList.inputList[i-1].dueDate"  style="text-align: center" @focus="getOldData(debitsList.inputList[i-1].dueDate)" @blur="save(debitsList.inputList[i-1].id,debitsList.inputList[i-1].dueDate,'dueDate','debits')"></td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: center">{{debitsList.inputList[i-1].drawerBank}}</td>
                    <td v-else><input type="text" v-model="debitsList.inputList[i-1].drawerBank"  style="text-align: center" @focus="getOldData(debitsList.inputList[i-1].drawerBank)" @blur="save(debitsList.inputList[i-1].id,debitsList.inputList[i-1].drawerBank,'drawerBank','debits')"></td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)"   style="text-align: center;word-wrap: break-word;">{{debitsList.inputList[i-1].debitsNo}}</td>
                    <td v-else><input type="text" v-model="debitsList.inputList[i-1].debitsNo"  style="text-align: center" @focus="getOldData(debitsList.inputList[i-1].debitsNo)" @blur="save(debitsList.inputList[i-1].id,debitsList.inputList[i-1].debitsNo,'debitsNo','debits')"></td>
                </template>
                <template v-else><td></td><td></td><td></td><td></td><td></td><td></td></template>

                <td class="lineBg"></td>
                <template v-if="debitsList.outputList[i-1]" v-cloak>
                    <td >{{debitsList.outputList[i-1]?i:""}}</td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: right">{{fmoney(debitsList.outputList[i-1].money)}}</td>
                    <td v-else><input type="text" v-model="debitsList.outputList[i-1].money"  style="text-align: right" @focus="getOldData(debitsList.outputList[i-1].money)" @blur="save(debitsList.outputList[i-1].id,debitsList.outputList[i-1].money,'money','debits')"></td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: left">{{debitsList.outputList[i-1].outcomeProject}}</td>
                    <td v-else><input type="text" v-model="debitsList.outputList[i-1].outcomeProject"  style="text-align: left" @focus="getOldData(debitsList.outputList[i-1].outcomeProject)" @blur="save(debitsList.outputList[i-1].id,debitsList.outputList[i-1].outcomeProject,'outcomeProject','debits')"></td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: center">{{debitsList.outputList[i-1].dueDate}}</td>
                    <td v-else><input type="text" v-model="debitsList.outputList[i-1].dueDate"  style="text-align: center" @focus="getOldData(debitsList.outputList[i-1].dueDate)" @blur="save(debitsList.outputList[i-1].id,debitsList.outputList[i-1].dueDate,'dueDate','debits')"></td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: center">{{debitsList.outputList[i-1].drawerBank}}</td>
                    <td v-else><input type="text" v-model="debitsList.outputList[i-1].drawerBank"  style="text-align: center" @focus="getOldData(debitsList.outputList[i-1].drawerBank)" @blur="save(debitsList.outputList[i-1].id,debitsList.outputList[i-1].drawerBank,'drawerBank','debits')"></td>
                    <td v-if="!isEdit||type=='report'" @click="edit(i)"  style="text-align: center;word-wrap: break-word;">{{debitsList.outputList[i-1].debitsNo}}</td>
                    <td v-else><input type="text" v-model="debitsList.outputList[i-1].debitsNo"  style="text-align: center" @focus="getOldData(debitsList.outputList[i-1].debitsNo)" @blur="save(debitsList.outputList[i-1].id,debitsList.outputList[i-1].debitsNo,'debitsNo','debits')"></td>
                </template>
                <template v-else><td></td><td></td><td></td><td></td><td></td><td></td></template>
            </tr>
            <tr style="text-align: right" v-cloak>
                <td style="text-align: center">收入合计</td>
                <td>{{debitsList.totalIncome?fmoney(debitsList.totalIncome):"0.00"}}</td>
                <td colspan="4"></td>
                <td class="lineBg"></td>
                <td style="text-align: center">支出合计</td>
                <td>{{debitsList.totaloutcome?fmoney(debitsList.totaloutcome):"0.00"}}</td>
                <td colspan="4"></td>
            </tr>
            <tr style="color:red;font-weight: bold;text-align: right;">
                <td style="text-align: center">合计</td>
                <td style="border-right: none;">{{debitsList.totalcount?fmoney(debitsList.totalcount):"0.00"}}</td>
                <td colspan="11" style="border-left:none;"></td>
            </tr>
            </thead>
        </table>

        <div style="margin-top:20px;" :id="'div'+item.id" v-for="(item,i) in list">
            <div class="tableTitle">{{item.bankName}}</div>
            <table class="table table-hover" style="margin: -1px 0">
                <thead>

                <tr>
                    <th style="width:6%;text-align: center" class="tableTitle">编号</th>
                    <th style="width:7%;text-align: center" class="tableTitle">金额</th>
                    <th style="width:37%;text-align: center" class="tableTitle">收入项目</th>
                    <th  class="lineBg" style="width:1%;text-align: center">&nbsp;</th>
                    <th style="width:6%;text-align: center" class="tableTitle">编号</th>
                    <th style="width:8%;text-align: center" class="tableTitle">金额</th>
                    <th style="width:36%;text-align: center" class="tableTitle">支出项目</th>
                </tr>

                </thead>
                <tbody>
                <tr style=";text-align: right" v-for="i in item.flowList.number" >
                    <template v-if="item.flowList.flowFirst[i-1]" v-cloak>
                        <td style="text-align: center">{{item.flowList.flowFirst[i-1]?i:""}}</td>
                        <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: right">{{fmoney(item.flowList.flowFirst[i-1].money)}}</td>
                        <td v-else><input type="text" v-model="item.flowList.flowFirst[i-1].money"  style="text-align: right" @focus="getOldData(item.flowList.flowFirst[i-1].money)" @blur="save(item.flowList.flowFirst[i-1].id,item.flowList.flowFirst[i-1].money,'money')"></td>
                        <!--<td>{{item.flowList.flowFirst[i-1]?item.flowList.flowFirst[i-1].money:""}}</td>-->
                        <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: center" >{{item.flowList.flowFirst[i-1].project}}{{item.flowList.flowFirst[i-1].remark?'('+item.flowList.flowFirst[i-1].remark+')':''}}</td>
                        <td v-else><input type="text" v-model="item.flowList.flowFirst[i-1].project" @focus="getOldData(item.flowList.flowFirst[i-1].project)" @blur="save(item.flowList.flowFirst[i-1].id,item.flowList.flowFirst[i-1].project,'project')"></td>
                    </template>
                    <template v-else>
                        <td></td><td></td><td></td>
                    </template>
                    <td class="lineBg"></td>
                    <template v-if="item.flowList.flowZero[i-1]">
                        <td style="text-align: center">{{item.flowList.flowZero[i-1]?i:""}}</td>
                        <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: right">{{fmoney(item.flowList.flowZero[i-1].money)}}</td>
                        <td v-else><input type="text" v-model="item.flowList.flowZero[i-1].money"  style="text-align: right" @blur="save(item.flowList.flowZero[i-1].id,item.flowList.flowZero[i-1].money,'money')"></td>
                        <td v-if="!isEdit||type=='report'" @click="edit(i)" style="text-align: center">{{item.flowList.flowZero[i-1].project}}{{item.flowList.flowZero[i-1].remark?'('+item.flowList.flowZero[i-1].remark+')':''}}</td>
                        <td v-else><input type="text" v-model="item.flowList.flowZero[i-1].project" @blur="save(item.flowList.flowZero[i-1].id,item.flowList.flowZero[i-1].project,'project')"></td>
                    </template>
                    <template v-else>
                        <td></td><td></td><td></td>
                    </template>

                </tr>
                <tr style=";text-align: right" v-cloak>
                    <td style="text-align: center">收入合计</td>
                    <td>{{item.flowList.totalIncome?fmoney(item.flowList.totalIncome):"0.00"}}</td>
                    <td ></td>
                    <td class="lineBg"></td>
                    <td style="text-align: center">支出合计</td>
                    <td>{{item.flowList.totalPay?fmoney(item.flowList.totalPay):"0.00"}}</td>
                    <td ></td>
                </tr>
                <tr style="font-weight: bold;text-align: right;" v-cloak>
                    <td style="text-align: center">昨日余额</td>
                    <td style="border-right: none;">{{item.flowList.yestdayBalance?fmoney(rmoney(item.flowList.yestdayBalance)):"0.00"}}</td>
                    <td style="border-left:none;"></td>
                    <td class="lineBg"></td>
                    <td style="text-align: center;color:red;">今日余额</td>
                    <td style="border-right: none;">{{item.flowList.todayBalance?fmoney(rmoney(item.flowList.todayBalance)):"0.00"}}</td>
                    <td style="border-left:none;"></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>

    <!-- /.box-body -->
</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript" src="/dist/plugins/select2/select2.full.min.js"></script>
<script>
    $(function () {
        $("body").on("click", ".more", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {
                var text = $(this).text();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });
</script>
<script type="text/javascript">
    Vue.directive('select2', {
        inserted: function (el, binding, vnode) {
            var options = binding.value || {};

            $(el).select2(options).on("select2:select", function (e) {
                el.dispatchEvent(new Event('change', {target: e.target})); //说好的双向绑定，竟然不安套路
            });
        },
        update: function (el, binding, vnode) {
            $(el).trigger("change");
        }
    });
    var app = new Vue({
        el: '#list',
        data: {
            bankList:[{"bankName":"","id":""}],
            type:$.wyui.page.urlParams.type,
            bankChecked:"",
            time:new Date().Format("yyyy-MM-dd"),
            list:[],
            debitsList:[],
            companyId:"",
            oldData:"",
            companyList:'',
            queryCompanyId:"",
            isEdit:false
        },
        methods: {
            fmoney:function(s,n){
                n = n > 0 && n <= 20 ? n : 2;
                s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
                var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1],
                    t = "";
                for (i = 0; i < l.length; i++) {
                    t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
                }
                return t.split("").reverse().join("") + "." + r;
            },
            rmoney:function (s) {
                if (s == 0)
                    return 0;
                else
                    return parseFloat(s.replace(/[^\d\.-]/g, ""));
            },
            showDatePicker: function (e) {
                var that = this;
                WdatePicker({
                    onpicked: function (dp) {
                        that.time = dp.cal.getNewDateStr();
                        return true;
                    },
                    //dateFmt:'yyyy-MM-dd HH:mm'
                });
                $(e.target).blur();
            },
            edit:function (i) {
                this.isEdit=true;
            },
            getOldData:function (oldData) {
                this.oldData=oldData;
            },
            save:function (id,newData,type,debits) {
                var that=this;
                this.isEdit=false;
                console.log(id,this.oldData,newData,type)
                if(this.oldData!=newData){
                    if (confirm("你确定要修改数据吗？"))
                    {
                        var data = {},type=type;
                        data.id=id;
                        data[type]=newData;
                        if(debits){
                            $.wyui.postMethod(urlConfig.capital.bankDebits.save, data, function (r) {
                                alert("数据更新成功!");
                                that.getList();
                            });
                        }else{
                            $.wyui.postMethod(urlConfig.capital.flow.updateFlow, data, function (r) {
                                alert("数据更新成功!");
                                that.getList();
                            });
                        }

                    }
                    document.getElementById('app').focus()
                }
            },
            getList:function () {
                var that=this;
                //获取汇票台账
                $.wyui.postMethod(urlConfig.capital.bankDebits.getBankDebitsByReport, {"companyId":that.companyId,"date":that.time}, function (r) {
                    console.log(r);
                    that.debitsList=r[0];
//
                });
                $.wyui.postMethod(urlConfig.capital.flow.getBankCardListAndFlowList, {"fkCompanyId":that.companyId,"date":that.time}, function (r) {
                    that.list=r;
                    console.log(r);
                });
                this.changeBanck();
            },
            changeBanck:function(){
                var that=this;
                that.bankList=[];
                $.wyui.postMethod(urlConfig.capital.bankCard.getBankCardList, {"fkCompanyId":that.companyId,useStatus:1}, function (r) {
                    console.log(r)
                    that.bankList=r;
                });
            },
            goDetail:function(type){
                var that=this;
                switch (type){
                    //内部转账
                    case "transferAccounts":
                        var url = "/page/reportForm/capital/transferAccounts.html?companyId="+that.companyId+"&time="+that.time;
                        top.$.dialog({
                            content: 'url:'+url,
                            title: '内部转账',
                            width: 950,
                            height: 400,
                            max: false,
                            min: false,
                            lock: true
                        });
                        break;
                    //支出
                    case "expenditure":
                        var url = "/page/reportForm/capital/expenditure.html?companyId="+that.companyId+"&time="+that.time;
                        top.$.dialog({
                            content: 'url:'+url,
                            title: '支出',
                            width: 750,
                            height:400,
                            max: false,
                            min: false,
                            lock: true
                        });
                        break;
                    case "income":
                        var url = "/page/reportForm/capital/income.html?companyId="+that.companyId+"&time="+that.time;
                        top.$.dialog({
                            content: 'url:'+url,
                            title: '收入',
                            width: 750,
                            height: 400,
                            max: false,
                            min: false,
                            lock: true
                        });
                        break;
                    case "bankList":
                        url = "reportForm/capital/accountList.html?formReport=1&companyId="+that.companyId;
                        top.closeTabByPageId("accountList");
                        top.addTabs({id:"accountList",title:"银行卡资金列表",close: true,url:url});
                        break;
                    default:
                        break;
                }
            }

        },

        mounted: function () {
            var that = this;

            if($.wyui.page.urlParams.companyId){
                that.companyId=$.wyui.page.urlParams.companyId
            }else{
                that.companyId=getCurrentUser().companyId

                //应收账款专员，孙强可看见所有公司的
                if(getCurrentUser().roleName=="应收账款专员"||getCurrentUser().name=="孙强"||getCurrentUser().name=="靳悦双"||getCurrentUser().name=="曹国玉"||getCurrentUser().name=="谈小中"||getCurrentUser().name=="要晋龙"||getCurrentUser().name=="林恩智"){
                    $.wyui.postMethod(urlConfig.system.company.getCompanyList, {}, function (r) {
                        console.log(r)
                        for(var i=0;i<r.length;i++){
                            if(r[i].name=="滚滚向前集团"){
                                r.splice(i, 1);
                            }
                        }
                        for(var i=0;i<r.length;i++){
                            r[i].companyId=r[i].id
                            r[i].companyName=r[i].name
                        }
                        that.companyList=r;
                        that.companyId=r[0].id
                    },true);
                }else{
                    $.wyui.postMethod(urlConfig.system.user.getCompanyIdsByUserId, {"userId":getCurrentUser().id}, function (r) {
                        that.companyList=r;
                        that.companyId=r[0].companyId
                    },true);
                }
            }
            if($.wyui.page.urlParams.time){
                that.time=$.wyui.page.urlParams.time
            }else{
                that.time=new Date().Format("yyyy-MM-dd")
            }
            $.wyui.postMethod(urlConfig.capital.bankCard.getBankCardList, {"fkCompanyId":that.companyId,useStatus:1}, function (r) {
                that.bankList=r;
            });
            that.getList();

            $(".select2").select2();
            $(".select2").select2().on('select2:select', function (e) {
                var clazz = $(this).attr("class");
                if(clazz.indexOf("queryId")>-1){
                    that.companyId=$(this).val();
                }
                else if (clazz.indexOf("company") > -1){
                    that.bankChecked = $(this).val();
                    var id="div"+that.bankChecked;
                    var container = $('.iframeH3'),
                        scrollTo = $('#'+id);
                    container.animate({
                        scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop()
                    })
                }
                else if (clazz.indexOf("brand") > -1){that.brandChecked = $(this).val();}
                else if (clazz.indexOf("month") > -1){that.monthChecked = $(this).val();}
                else if (clazz.indexOf("exhibitionType") > -1){
                    that.exhibitionTypeChecked = $(this).val();
                }
                that.pageIndex = 1;

            });




        }
    });


</script>

</body>
</html>